import { defineConfig } from 'vite'
import ViteVue from '@vitejs/plugin-vue'
import VitePages from 'vite-plugin-pages'
import ViteMarkdown from 'vite-plugin-md'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import eslint from 'vite-plugin-eslint'
import { resolve } from 'path'
export default defineConfig({
  resolve: {
    alias: {
      '@': resolve(__dirname, 'src')
    }
  },
  plugins: [
    ViteVue({
      include: [/\.vue$/, /\.md$/]
    }),
    eslint(),

    VitePages({
      extensions: ['vue', 'md'],
      exclude: ['**/components/*.vue']
    }),

    ViteMarkdown(),
    AutoImport({
      imports: ['vue', 'vue-router']
    }),
    Components({
      extensions: ['vue', 'md']
    })
  ]
})
